import fs from 'fs'
import DebugInfo from '../debug/print.js'
import compile from '../lib/compile/index.js'

for (const file of fs.readdirSync('./test/')) {
  if (file.endsWith('.x')) {
    const debug = new DebugInfo('Test', file)
    debug.start()
    await compile({
      filepath: `test/${ file }`,
      type: 'script',
      xrehome: './xre'
    })
    debug.end()
  }
}
